<!DOCTYPE html>
<html>
<head>
    <title>查看--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
<!--    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>-->
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script type="text/javascript">
        var pageNumber ,pageSize;

    function getUrl(url,name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = url.split("?")[1].match(reg);
        //    var r = url.split(name+"=")[1].split("!")[0];
        if (r != null)
            return decodeURI(r[2]);
        return null;
    }
    function back(){
        window.location.href="/registration/index.html?pageNumber="+pageNumber+"&pageSize="+pageSize;
    }
    $(function () {
        //根据地址获取teamId,如果null则执行增加，否则执行更新
        let url = document.location.toString();//获取URL
        // let hosR_id=url.GetValue("hosR_id");
        // let pageNumber=url.GetValue("pageNumber");
        // let pageSize=url.GetValue("pageSize");

        let hosR_id = getUrl(url,"hosR_id");
         pageNumber = getUrl(url,"pageNumber");
         pageSize = getUrl(url,"pageSize");

        //链接带后缀！用

        //alert(teamId);
        //根据id查询要更新的球队信息并回显到页面
        queryById(hosR_id);
    });
    function queryById(id) {
        document.getElementById("hosR_id").setAttribute("value",id)
        //$("#hosR_id").val(id)
        $.ajax({
            type: "GET",
            url: "/hosregister/listByKey.do", //RESTful风格的API定义
            data: $("#myForm").serialize(),
            success: function (vo) {
                let obj=vo.obj;
                let hosR_id=obj.hosR_id== null? "" : obj.hosR_id ;
                let hosR_idCar=obj.hosR_idCar == null? "" : obj.hosR_idCar ;
                let horR_regPrice=obj.hosR_regPrice == null? "" : obj.hosR_regPrice ;
                let horR_medical=obj.hosR_medical == null? "" : obj.hosR_medical ;
                let hosR_phone=obj.hosR_phone == null? "" : obj.hosR_phone ;
                let hosR_selfPrice=obj.hosR_selfPrice == null?"":(obj.hosR_selfPrice == 0?"是":"否");
                let hosR_sex=obj.hosR_sex==null ? "":(obj.hosR_sex == 0 ? "男" : "女");
                let hosR_age=obj.hosR_age == null? "" : obj.hosR_age ;
                let hosR_work=obj.hosR_work == null? "" : obj.hosR_work ;
                let hosR_lookDoctor=obj.hosR_lookDoctor == null ? "" :(parseInt(obj.hosR_lookDoctor) == 0?"初诊" : "复诊");
                let d_keshi=obj.doctor.d_keshi == null? "" : obj.doctor.d_keshi ;
                let d_name=obj.doctor.d_name == null? "" : obj.doctor.d_name ;
                let hosR_remark=obj.hosR_remark == null? "" : obj.hosR_remark ;

                var str = " <tr>\n    " +
                    " <td width=\"10%\" class=\"tableleft\">姓名</td>\n   " +
                    "     <td>"+hosR_id+"</td>\n    </tr>\n\n  " +
                    "  <tr>\n        " +
                    "<td width=\"10%\" class=\"tableleft\">身份证号</td>\n    " +
                    "    <td>"+hosR_idCar+"</td>\n    </tr>\n " +
                    "   <tr>\n        <td width=\"10%\" class=\"tableleft\">挂号费</td>\n   " +
                    "     <td>"+horR_regPrice+"</td>\n    </tr>\n    <tr>\n " +
                    "       <td width=\"10%\" class=\"tableleft\">社保号</td>\n    " +
                    "    <td>"+horR_medical+"</td>\n    </tr>\n    <tr>\n " +
                    "       <td width=\"10%\" class=\"tableleft\">联系电话</td>\n    " +
                    "    <td>"+hosR_phone+"</td>\n    </tr>\n    <tr>\n   " +
                    "     <td width=\"10%\" class=\"tableleft\">是否自费</td>\n     " +
                    "   <td>"+hosR_selfPrice+"</td>\n    </tr>\n  " +
                    " <tr>\n   <td width=\"10%\" class=\"tableleft\">性别</td>\n  " +
                    "      <td>"+hosR_sex+"</td>\n    </tr>\n    <tr>\n      " +
                    "  <td width=\"10%\" class=\"tableleft\">年龄</td>\n    " +
                    "    <td>"+hosR_age+"</td>\n    </tr>\n " +
                    "   <tr>\n        <td width=\"10%\" class=\"tableleft\">职业</td>\n   " +
                    "     <td>"+hosR_work+"</td>\n    </tr>\n    <tr>\n      " +
                    "  <td width=\"10%\" class=\"tableleft\">初复诊</td>\n    " +
                    "    <td>"+hosR_lookDoctor+"</td>\n    </tr>\n   " +
                    " <tr>\n        <td width=\"10%\" class=\"tableleft\">所挂科室</td>\n " +
                    "       <td>"+d_keshi+"</td>\n    </tr>\n  " +
                    "  <tr>\n      <td width=\"10%\" class=\"tableleft\">指定医生</td>\n " +
                    "       <td>"+d_name+"</td>\n    </tr>\n" +
                    "	<tr>\n        <td width=\"10%\" class=\"tableleft\">备注</td>\n  " +
                    "      <td>"+hosR_remark+"</td>\n	</tr>\n    <tr>\n      " +
                    "  <td colspan=\"2\">\n			<center>\n			" +
                    "	<button type=\"button\" class=\"btn btn-success\" name=\"backid\" id=\"backid\" onclick='back()'>返回列表</button>\n	" +
                    "		</center>\n		</td>\n    </tr>"
             $("#tboby").html(str);
            }

        });
    }

    </script>
</head>
<body>
<form action="index.html" method="post" class="definewidth m20" id="myForm">
<table class="table table-bordered table-hover definewidth m10" id="myTable">
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">姓名</td>-->
<!--        <td>陆小凤</td>-->
<!--    </tr>-->

<!--    <tr>-->
<!--        <td width="10%" class="tableleft">身份证号</td>-->
<!--        <td>102434586345673</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">挂号费</td>-->
<!--        <td>5元</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">社保号</td>-->
<!--        <td>435345435</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">联系电话</td>-->
<!--        <td>12378656789</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">是否自费</td>-->
<!--        <td>否</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">性别</td>-->
<!--        <td>男</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">年龄</td>-->
<!--        <td>33</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">职业</td>-->
<!--        <td>狗仔队</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">初复诊</td>-->
<!--        <td>初诊</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">所挂科室</td>-->
<!--        <td>骨科</td>-->
<!--    </tr>-->
<!--    <tr>-->
<!--        <td width="10%" class="tableleft">指定医生</td>-->
<!--        <td>欧阳雨露</td>-->
<!--    </tr>-->
<!--	<tr>-->
<!--        <td width="10%" class="tableleft">备注</td>-->
<!--        <td>此人疑拟有精神病</td>-->
<!--	</tr>-->
<!--    <tr>-->
<!--        <td colspan="2">-->
<!--			<center>-->
<!--				<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>-->
<!--			</center>-->
<!--		</td>-->
<!--    </tr>-->
    <tbody id="tboby">
    </tbody>
</table>
    <input type="hidden" id="hosR_id" name="hosR_id" value="1"/>
</form>
</body>
</html>